package gui.visu.listeners;


import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import tuio.components.ComboBoxTouch;

import controls.DataControl;

/**
 * @author Charles Perin
 * 29 mars 2011
 * LIMSI - INRIA Rennes
 * charles.perin@free.fr
 *
 */
public class ListenerNbOfCutsComboBox implements ActionListener{
	
	private DataControl dataControl;


	public ListenerNbOfCutsComboBox(DataControl dataControl){
		setDataControl(dataControl);
	}

	@Override
	public void actionPerformed(ActionEvent arg0) {
		ComboBoxTouch cb = (ComboBoxTouch) arg0.getSource();
		int selected = cb.getSelectedIndex();
		dataControl.setNbCutForSelectedCurve(selected);
	}

	public DataControl getDataControl() {
		return dataControl;
	}

	public void setDataControl(DataControl dataControl) {
		this.dataControl = dataControl;
	}

}
